package com.jiangnan.util

import androidx.lifecycle.MutableLiveData
import com.jiangnan.entity.LoginInfo

object CurrentHolder {
    private val currentLocal: ThreadLocal<LoginInfo> = ThreadLocal()

    fun setCurrentLoginInfo(loginInfo: LoginInfo) {
        currentLocal.set(loginInfo)
    }

    fun getCurrentLoginInfo(): LoginInfo? {
        return currentLocal.get()
    }

    fun remove() {
        currentLocal.remove()
    }
}
